const db=wx.cloud.database();

//获取捐助者捐助的物品
export const getDonatedGoods= async(_openid) => {
  const res=await db.collection("donor").where({
    _openid: _openid,
  }).get();
  //console.log(res.data);
  return res.data[0].goods;
}

//获取捐助者捐助的孩子金额
export const getAmountForChild= async(_openid) =>{
  const res=await db.collection("donor").where({
    _openid: _openid,
  }).get();
  return res.data[0].students;
}

//获取捐助者捐助的项目
export const getAmountForProject= async(_openid) =>{
  const res=await db.collection("donor").where({
    _openid: _openid,
  }).get();
  return res.data[0].projects;
}


